<template>
  <div class="ec-app-container">
    <!-- 查询条件 -->
    <div class="filter-container">
      <el-form label-width="90px">
        <el-row :gutter="10">
          <el-col :span="6">
            <el-form-item label="楼旁名称：" >
              <el-input v-model="listQuery.title" placeholder="姓名"/>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="城市：" >
              <el-input v-model="listQuery.title" placeholder="账号"/>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="楼旁状态：" >
              <el-select v-model="listQuery.title" placeholder="用户状态" clearable>
                <el-option v-for="(item, index) in buildingStatus" :label= "item" :value="index+1" :key="index"/>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6" class="text-center">
            <el-button type="" class="border-4C7FD7 color-4C7FD7" icon="el-icon-search" @click="searchList">查询</el-button>
            <el-button class="border-4C7FD7 color-4C7FD7" @click="resetSearch">重置</el-button>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- table -->
    <div>
      <div class="mt-30">
        <!--<el-button class="filter-item" type="primary" @click="searchList">待发布</el-button>-->
        <!--<el-button class="filter-item" type="primary" @click="searchList"></el-button>-->
        <!--<el-button class="filter-item" type="primary" @click="searchList">批量下架</el-button>-->
        <!-- <el-button class="filter-item" type="primary" @click="addBuilding">新增</el-button> -->
        <el-button class="filter-item" type="primary" @click="exprotBuilding">导出</el-button>
      </div>
      <div class="mt-20" >
        <el-table
          v-loading="listLoading"
          :data="list"
          border
          fit
          highlight-current-row
          style="width: 100%;"
          @selection-change="handleSelectionChange">
          <el-table-column
            type="selection"
            width="55"/>
          <el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">发布</el-button>
              <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
              <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">删除</el-button>
              <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">查看</el-button>
              <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">撤销</el-button>
            </template>
          </el-table-column>
          <el-table-column label="楼盘名称" prop="id" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.buildingName }}</span>
            </template>
          </el-table-column>
          <el-table-column label="城市" prop="id" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.cityName }}</span>
            </template>
          </el-table-column>
          <el-table-column label="楼旁状态" prop="id" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.buildingStatus }}</span>
            </template>
          </el-table-column>
          <el-table-column label="物业公司" prop="id" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.id }}</span>
            </template>
          </el-table-column>
          <el-table-column label="创建人" prop="id" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.id }}</span>
            </template>
          </el-table-column>
          <el-table-column label="创建时间" prop="id" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.id }}</span>
            </template>
          </el-table-column>
          <el-table-column label="发布状态" prop="id" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.id }}</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="searchList" />
    </div>
  </div>
</template>

<script>
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination、
import mixin from '@/mixins/index'
export default {
  name: 'Project',
  components: {
    Pagination
  },
  mixins: [mixin],
  data() {
    return {
      listQuery: {
        title: '',
        pageSize: 10,
        pageNum: 1
      }
    }
  },
  created() {
    // 初始化
    this.searchList()
  },
  methods: {
  }
}
</script>

<style scoped>

</style>
